﻿@page
@model WXWorkSvc.Areas.Admin.Pages.PrivateAgent.IndexModel

@{
    ViewData["Title"] = "内部应用";
}
<h4>@ViewData["Title"]</h4>
<hr />
<p>
    <a asp-page="Create">Create New</a>
</p>
<table class="table">
    <thead>
        <tr>
            <th>@Html.DisplayNameFor(model => model.TPrivateAgent[0].Id)</th>
            <th>@Html.DisplayNameFor(model => model.TPrivateAgent[0].Name)</th>
            <th>@Html.DisplayNameFor(model => model.TPrivateAgent[0].Roles)</th>
            @*              <th>
            @Html.DisplayNameFor(model => model.TPrivateAgent[0].Secret)
            </th>
            <th>
            @Html.DisplayNameFor(model => model.TPrivateAgent[0].Token)
            </th>
            *@
            <th>
                @Html.DisplayNameFor(model => model.TPrivateAgent[0].DTExpiresToken)
            </th>
            @*          <th>
            @Html.DisplayNameFor(model => model.TPrivateAgent[0].JsTicket)
            </th>
            <th>
            @Html.DisplayNameFor(model => model.TPrivateAgent[0].AgentJsTicket)
            </th>
            *@
            <th>
                @Html.DisplayNameFor(model => model.TPrivateAgent[0].DTExpiresTicket)
            </th>
            <th></th>
        </tr>
    </thead>
    <tbody>
        @foreach (var item in Model.TPrivateAgent)
        {
            <tr>
                <td>
                    @Html.DisplayFor(modelItem => item.Id)
                </td>

                <td>
                    @Html.DisplayFor(modelItem => item.Name)
                </td>

                <td>
                    @Html.DisplayFor(modelItem => item.Roles)
                </td>
                @*                <td>
            @Html.DisplayFor(modelItem => item.Secret)
            </td>
            <td>
            @Html.DisplayFor(modelItem => item.Token)
            </td>
            *@
                <td title="@item.Token">
                    @Html.DisplayFor(modelItem => item.DTExpiresToken)
                </td>
                @*              <td>
            @Html.DisplayFor(modelItem => item.JsTicket)
            </td>
            <td>
            @Html.DisplayFor(modelItem => item.AgentJsTicket)
            </td>
            *@
                <td title="@("JsTicket:"+ item.JsTicket+"\r\nAgentJsTicket:"+item.AgentJsTicket )">
                    @Html.DisplayFor(modelItem => item.DTExpiresTicket)
                </td>
                <td>
                    <a asp-page="./Edit" asp-route-id="@item.Id">Edit</a> |
                    <a asp-page="./Delete" asp-route-id="@item.Id">Delete</a>
                </td>
            </tr>
        }
    </tbody>
</table>
